<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@page import="com.demoweb.model.dto.Membership"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Red Fortress</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link href="/demoweb/styles/style.css" rel="stylesheet" type="text/css" />
</head>
<body>

<% pageContext.include("/WEB-INF/views/include/fortressheader.jsp"); %>

<div id="content">
  <div id="sidebar">
    <% pageContext.include("/WEB-INF/views/include/fortresslogin.jsp"); %>
	<% pageContext.include("/WEB-INF/views/include/fortressrecentupdates.jsp"); %>	
  </div>
  
  <!-- ---------------------------------- Main page content ----------------------------------- -->
  
  <div id="main"> 
  	  <h2 class="title">Fortress Register</h2>
  	
	<link rel="Stylesheet" href="/demoweb/styles/input.css" />
	<script type="text/javascript">
	function checkAndSubmit() {
		var message = "";
		var memberId = document.getElementById("memberId");
		if (memberId.value.length == 0) {
			message += "아이디를 입력하세요.\r\n";
		}
		/* var regExp = new RegExp("/^[0-9A-Za-z]{5,20}$");
		if(!regExp.test(memberId)) {
			message += (memberId + "아이디 형식 오류(영문자,숫자 조합 5~ 20개)\r\n");
		} */ 
		
		var passwd = document.getElementById("passwd");
		if (passwd.value.length == 0) {
			message += "비밀번호를 입력하세요.\r\n";
		}
		
		var confirm = document.getElementById("confirm");
		if (confirm.value != passwd.value) {
			message += "비밀번호 불일치.\r\n";
		}
		
		if (message.length > 0) {
			alert(message);
		} else {
			document.getElementById("registerform").submit();
		}
	}
	</script>

	<div id="pageContainer">
		<div id="inputcontent">
			<br /><br />
		    <div id="inputmain">
		        <div class="inputsubtitle">회원기본정보</div>

		        <form id="registerform" action="fortressRegister.nhn" method="post"><!-- 상대경로표시 -->
		        <table>
		            <tr>
		                <th>아이디(ID)</th>
		                <td>
		                    <input type="text" id="memberId" name="memberId" style="width:280px" />
		                </td>
		            </tr>
		            <tr>
		                <th>비밀번호</th>
		                <td>
		                	<input type="password" id="passwd" name="passwd" style="width:280px" />
		                </td>
		            </tr>
		            <tr>
		                <th>비밀번호 확인</th>
		                <td>
		                    <input type="password" id="confirm" name="confirm" style="width:280px" />
		                </td>
		            </tr>
		            <tr>
		                <th>이름</th>
		                <td>
		                	<input type="text" name="name" style="width:280px" />
		                </td>
		            </tr>
		            <tr>
		                <th>이메일</th>
		                <td>
		                	<input type="text" name="email" style="width:280px" />
		                </td>
		            </tr>
		            <tr>
		                <th>주소</th>
		                <td>
							<input type="text" name="address" style="width:280px" />
		                </td>
		            </tr>
		            <tr>
		                <th>주민등록번호</th>
		                <td>
		                	<input type="text" name="regNum" style="width:280px" />
		                </td>
		            </tr>		            		            
		        </table>
		        <div class="buttons">
		        	<input type="button" value="등록" style="height:25px" onclick="checkAndSubmit();" />
		        	<input type="button" value="취소" style="height:25px"
		        		onclick="location.href='list.action';" />

		        </div>
		        </form>
		    </div>
		</div>   	
	
	</div>
  	  
  	  
  </div>
  
  <!-- -------------------------------------------------------------------------------------------- -->
  
</div>
<div id="footer">
  <p id="legal">Copyright &copy; 2007 Red Avenue. All Rights Reserved. Designed by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p>
  <p id="links"><a href="http://www.free-css.com/">Home</a> | <a href="http://www.free-css.com/">Terms of Use</a></p>
</div>
</body>
</html>
